<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category 2022_06_30_150700_create_log_curls_table.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/4/30  15:07
 * +--------------------------------------------------------+
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

class CreateLogCurlsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('log_curls', function (Blueprint $table) {
            $table->increments('id');
            $table->string('url')->nullable()->comment('url');
            $table->smallInteger('status')->nullable()->comment('状态 1成功 2失败');
            $table->text('input')->nullable()->comment('发送内容');
            $table->text('result')->nullable()->comment('结果');
            $table->timestamps();
        });

        DB::statement("ALTER TABLE `la_log_curls` comment 'curl日志'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('log_curls');
    }
}

